SRAT memory hotplug 2/2: Support overlapped and sparse node memory arrangement.
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 9 Dec 2009 10:42:53 +0000 (10:42 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 9 Dec 2009 10:42:53 +0000 (10:42 +0000)
commit6369c4faa303cd4e8af9ff6ad73315122d9defc5
tree170dcce577b237ae629f6572685f65c2d3f99171
parent4d817e3923416c21a61c0df32f244893974eb2e8
SRAT memory hotplug 2/2: Support overlapped and sparse node memory arrangement.

Currently xen hypervisor use nodes to keep start/end address of
node. It assume memory among nodes has no overlap, this is not always
true, especially if we have memory hotplug support in the system.
This patch backport Linux kernel's memblks to support overlapping
among node. The memblks will be used both for checking conflict, and
caculate memnode_shift.

Also, currently if there is no memory populated in a node when system
booting, the node will be unparsed later, and the corresponding CPU's
numa information will be removed also. This patch will keep the CPU
information.

One thing need notice is, currently we caculate memnode_shift with all
memory, including un-populated ones. This should work if the smallest
chuck is not so small. Other option can be flags in the page_info
structure, etc.

The memnodemap is changed from paddr to pdx, both to save space, and
also because currently most access is from pfn.

A flag is mem_hotplug added if there is hotplug memory range.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
xen/arch/x86/mm.c
xen/arch/x86/numa.c
xen/arch/x86/srat.c
xen/include/asm-x86/mm.h
xen/include/asm-x86/numa.h
xen/include/asm-x86/page.h